package com.gee.spring.boot.rpf.client.calculator.factor.exicr2;

import com.gee.spring.boot.rpf.client.calculator.factor.AbstractClientCalculator;
import com.gee.spring.boot.rpf.client.exicr2.ExiCr2Response;
import com.gee.spring.boot.rpf.common.constant.FactorConstant;
import org.springframework.stereotype.Component;

/**
 * desc:
 *
 * @author gee wrote on  2021-02-07 11:24:42
 */
@Component
public class FundBasePayment extends AbstractClientCalculator<ExiCr2Response> {

    @Override
    public Double process(ExiCr2Response response, Object ...otherParam) throws Exception {
        return response.getFundBasePayment() == null ? FactorConstant.FACTOR_RESULT_DOUBLE_PARA_IS_NULL
                : response.getFundBasePayment();
    }
}
